package weitu;

import java.util.Arrays;
import java.util.BitSet;
import java.util.Random;

public class text {

    public static void main4(String[] args) {
        //Sort
        int[] arr = {2, 3, 4, 1, 0, 9, 5};
        MyBitset hh = new MyBitset();
        MyBitset hhh = new MyBitset();
        System.out.println(Arrays.toString(hh.sort(arr)));
        Random random = new Random();
        for (int i = 0; i <arr.length; i++) {
//            int r = random.nextInt(20);
            hhh.add(arr[i]);
        }
//        System.out.println("random");
        System.out.println(Arrays.toString(hhh.sort()));

    }
    public static void main3(String[] args) {
        Random random = new Random();
        MyBitset hh = new MyBitset();
        for (int i = 0; i < 10; i++) {
            hh.add(random.nextInt(66));
            hh.clear(random.nextInt(66));
            hh.contain(random.nextInt(66));
        }

    }
    public static void main(String[] args) {
        MyBitset hh = new MyBitset();
        hh.add(2);
        hh.add(3);
        System.out.println(hh.contain(3));
        System.out.println(hh.contain(2));
        BitSet n = new BitSet();
        System.out.println(n.get(1));
        System.out.println("----");
        n.set(1);
        System.out.println(n.get(1));

        hh.clear(2);
        System.out.println(hh.contain(2));

    }
}
